1. processing and sorting machine signal management 1

因此,在我们上一个视频中,我们成功编写和创建了一个软件组件来管理信号,特别是管理故障和警报的应用程序,这样我们就可以直接将其复制到我们的机器项目中,即 Android 应用程序中。
So in our last videos, we managed to write and create a software component to manage signals and in particular for application to manage faults and alarms so we can directly copy that in our machine project here, here in the application Android application.

让我们复制我们创建的文件夹信号管理的内容。
Let's copy the content of the folder signal management that we created.

在这里,我已经粘贴了我们在这里开发的所有内容,让我们打开全局变量列表并创建信号管理功能块,例如,在全局变量列表中,以便可以从代码中的任何部分访问它。
Here I have pasted all that we have developed here and let's open up our global variable list and create the signal management function block, for instance, here in the global variable list, in order for it to be accessible from any part in the code.

因此,您将创建一个管理功能块。
So you will create a single management function block.

类型为 F.P.
The type is F.P.

信号管理。
signal management.

好的,现在,为了实例化它,Functio,看,我们只需要在程序中调用它。
OK, so right now, in order to we have instantiated it, Functio, look, we just need to call it within the program.

正如您所记得的,我们创建或编写了这段代码,以一种非常简单的方式管理故障。
So as you recall here, we created or we wrote this code to manage the faults in a very simple way.

因此,让我们改变这一点,并开始将瀑布添加到我们的,呃,我们的实际系统中。
So let's change that and let's start adding the falls to our, uh, to our actual system.

因此,我将在这里创建一个新操作,专门用于处理通用设备故障。
So I will create a new action here that will be dedicated to the generic devices faults.

抱歉,不是方法,而是行动。
Sorry, not a method, but an action.

如果听起来不错,请将其称为通用设备,故障下划线操作,我将在通用设备之后将其称为“错误的抱歉,错误的操作”。
And if the sounds fine, call it generic devices, faults underscore action, and I will call it right here after the generic devices, false sorry, false action.

好的,所以在我们的这个操作中,我们将多次调用信号管理功能块。
OK, so in our in this action, we will call multiple times the, um, the signal management function block.

因此,在这里我将创建对信号管理的第一个调用,并删除所有问号。
So here I will create the first call to the signal management and I will remove all the question marks.

我将添加全局变量列表、全局信号列表。
I will add the global variable list, the global signal list.

抱歉,我弄错了,全局信号列表。
Sorry, I got it wrong here, global signal list.

然后我将首先添加我将为每个可能的设备故障添加一个调用。
And then I will start by adding I will add a call for each possible device fault.

因此,如果我们在这里获取通用设备,如您所见,我们有四种不同的故障和反馈故障可反馈故障以及通用故障的故障。
So if we're getting our generic device here, we have, as you can see, four different faults and feedback fault zable feedback fault with the fault of generic fault.

当然,我在这里实际上可以做的是,我们希望将重置按钮作为通用设备故障的每个故障的重置输入。
So what I can actually do here is, of course, we will want to the reset button for the as the reset input for each Faulds for the generic devices faults.

我们不想重置,因为由于我们禁用通用设备,这种情况实际上可能会自行消失。
We don't want to reset because the condition may actually disappear on its own because we disable the generic device.

信号类型需要是警报,然后我们需要实际更改导致默认的名称和条件。
The signal type needs to be an alarm and then we need to actually change the name and condition leading to the default.

因此,在这里我们需要做很多工作,比如说复制和粘贴,因为我们有九个通用设备,每个设备都有 Cannava 来应对可能的故障情况。
So here we will need to do quite a few, let's say, copy and paste, because we have nine generic devices with each of them Cannava for possible faults conditions.

那么让我们从第一个开始吧。
So let's start from the first one.

我们需要确保已经放置了一个独特的信号。
We need to be sure to place a unique signal already.

所以我会在这里放置,呃,信号我等于一。
So here I will place, uh, signal I'd be equal to one.

我将继续前进,我们将其保持等于功能框图行的行数。
And I will keep moving on and we keep this equal to the number of the line of the function block diagram line.

那么我们就从活塞装置开始吧。
So let's start from the piston device.

必须在此处设置有效信号 active。
The active signal active must be set here.

让我们看看活塞装置,该装置下降到与你相等。
Let's see piston device, that device fall to equal to you.

让我们看看我们的设备是什么?
Let's see what are our devices?

这就是设备折叠的情况。
That's the device folds.

让我们从第一个等于启用反馈故障的开始。
Let's start from the first one equal to enable feedback fault.

所以如果发生这种情况。
So here if this occurs.

下面看到,连接到Allama的串将是Besim设备使能反馈故障。
The following see, the string connected to the Allama will be Besim device enable feedback fault.

这将是在我们的紧急情况下、在我们向东的全球信号灯以及最终在我们的 HMG 上显示的线路。
This will be the line displayed in our emergency, in our global signal east and eventually on our HMG.

因此,让我们为活塞设置四次上限,然后我们需要在这里表示抱歉,禁用禁用反馈故障将导致此处出现此字符串。
So let's cap this four times for our piston and then we need we have the sorry here, the disable disable feedback fault that will lead to this string here.

哦抱歉,我这里编辑错了。
Oh sorry I, I edited the wrong one here.

因此,对于两秒内禁用的反馈故障,我们有可否认的反馈。
So we have deniable feedback for the disabled feedback fault within two.

那么我们就遇到了执行器故障。
Then we have the actuator fault.

带串的执行器故障将是执行器故障,或者我们有通用的购买通用故障以防单个反馈。
Actuator fault with string will be actuator fault or we have the generic to buy the generic fault in case of the single feedback.

单次驱动。
A single actuation.

单反馈装置。
Single feedback device.

所以一般性错误,一般性错误,我要补充的是今年的一般性错误。
So generic fault, generic fault and I will add is ad this year generic fault.

让我们更改索引,这样也许我们最终可以真正更改它们。
Let's change the indexes so maybe we can actually change them all by the end.

所以我会缩小一点以便能够做到这一点。
So I will zoom a little bit out to be able to do it.

这是一项相当乏味的工作,但有时当编程通过时,需要使用相当多的 R 来进行配置以及复制和粘贴。
This is quite a tedious work, but sometimes when programming passes there is quite a bit of R for configuration and the copying and pasting.

所以我将复制此内容并粘贴四次。
So I will copy this and paste it all four times.

我需要在这里改变。
I need to change here.

设备的名称。
The name of the device.

我将在这里简单地更改副本。
I will simply change copy here.

这将是所有四个语句中的杠杆装置。
This would be the lever device in all of four statements.

这里我会写出实际挥杆时的水平。
And here I will write level in the actual swing.

我会继续这样做,所以如果你想自己做的话,你可以在视频中跳过。
I will keep doing this, so maybe if you want to do this on your own, you can skip ahead in the video.

我会为您保留它,因为您可能需要跟进。
I will keep that for for you, since you may need to follow through.

我会继续这样做,但你实际上可以跳过视频直到最后并自己完成,因为这是相当,啊,可以说,机械和重复的任务。
I will keep on doing this, but you can actually skip the video till the end and do it on your own, since it is quite, ah, let's say, mechanical and repetitive task.

所以这里我们有级别组。
So here we have the level group.

好的。
OK.

我们已经完成了其中的三个,还有四个。
We have done three of them, four to go.

抱歉,还有六个。
Sorry, six to go.

13、14、16 就可以了。
13, 14, 16 is OK.

我们在电梯,电梯,电梯,电梯,电梯。
We are at the elevator, elevator, elevator, elevator and the elevator.

每一次。
And every time.

您可能会觉得这是一个很大的计算量,因为我们多次调用一个功能块,并且在这个和那个功能块中编写了相当多的代码行,这可能会让您感到奇怪。
It may seem odd for you that this is a lot of computation because we are calling a function block many, many times and we wrote quite a few lines of codes in this and that function block.

但您实际上可以看到,只有当信号被激活或停用时,这些行才会被执行。
But you can actually see that those lines will only be executed when the when either the signal is activated or deactivated.

所以大多数时候,这个功能块中不会执行任何代码,几乎根本不会执行任何代码。
So most of the time, no code, almost no code at all will be executed in this function block.

好吧,现在我才是真正的激活装置。
OK, so right now I am the real activation device.

激活。
The activation.

我几乎就在那里,投降和绿色运动的地方在这里,我们正在复制所有这些折叠,即使某些折叠可能不会出现在当前的架构中,因为我们希望它是灵活的。
I'm almost there, capitulation and the place of the green movement here, we are copying all this folds, even if some may not occur for the current architecture, because we want it to be flexible.

如果有一些,呃,如果机器架构发生变化。
If some some, uh, if that machine architecture changes.

因此,如果我们构建灵活的软件,我们将能够承受架构变化。
So if we build the software that is flexible, we will be able if to withstand an architectural change.

我们知道并通过改变一点点软件。
We know and by changing really a little bit of software.

我们快完成了。
We're almost done.

我只剩下两个设备了,这里是桌面设备。
I only have two more devices, the table device here.

台球桌和我们这里的桌子。
The pool table and table here we have the table.

唔。
Hmm.

他会的。
He will.

和。
And.

我们这里也有一张桌子。
Here we have a table as well.

还有桌子。
And table.

好吧,最后一个是桌面上的抓手。
OK, the last one is the one off the table griper.

我也会在这里改变,我会添加抓手。
And I will change also here, I will add griper.

你已经快完成这里了。
You're almost done in here.

最后在这里。
And lastly here.

好的,现在我只需要将索引从 1 更改为 1。
OK, now I need only to change the indexes from one to.

三十六,因为我们有九个设备乘以四种可能的故障,七、八、九、10。
Thirty six, because we have nine devices multiplied by four possible faults, seven, eight, nine, 10.

11、12、13 为 14。
11, 12, 13 for 14.

15.

15.

16、17、18,快到了。
16, 17, 18, almost on.

二十七。
Twenty seven.

28、29、30。

28, 29, 30.

31、32、33、34、35 和 36。
31, 32, 33, 34, 35 and 36.

好吧,现在如果你跳过头部,我会慢慢地滚动到这个列表,当然,为了让我仔细检查它,也许你也可以停下来自己复制它。
OK, now if you skip the head, I will slowly scroll to through this list, of course, in order for me to double check it and maybe for you to stop and copy it on your own.

似乎还可以。
Seems to be OK.

好的,所以我想我们已经为我们实现了所有这些功能。
OK, so I guess we implemented all of this falls for us.

现在,我还想做的是创建一个可视化,我们将专门用于,嗯,旧的诊断,呃,警报。
Right now, what I also want to do is to create a visualization that we will use for exclusively for the for the, um, for old diagnosis and, uh, for the alarms.

现在,我将点击“申请”。
So here right now, I will click on application.

我将添加一个可视化对象,并将其称为诊断 h my。
I will add an object that is a visualization and I will call it a diagnostic h my.

现在,这个属于我的将是空的。
Right now, this it's mine will be empty.

我现在想要的是创建一个列表,我们可以在其中显示印度发生的一定数量的警报。
And what I want right now is to create a list where we can display a certain number of alarms that occur in India.

我的所以我首先会在这里,嗯,在灯的功能和 Beith 地图中,我将添加一盏我想要打开的灯。
My SO I will first here, um, in the lamp's features and Beith maps here, I will add a lamp that I wanted to to I wanted to turn on.

每当出现故障时,就会发出警报。
Whenever there is a fault, there is an active alarm.

所以这里这个 Lampl 首先可以通过这里改变颜色。
So here this Lampl first can change the color by going here.

双击我希望它是红色的。
Double clicking I will want it to be red.

在这里我可以设置一个与灯的颜色相关的变量。
And here I can set a variable that will be connected to the color of the lamp.

我会在这里写。
And here I will write.

实际上,我将指向信号管理的全局变量列表,我将转到全局信号列表,如果某些警报处于活动状态,我会将其指向活动警报。
Actually, I will point to the global variable lists for the signal management that I will go to the global signal list and I will point it to the alarm active if some alarm is active.

我希望这是真的,被开启。
I want this to be true, to be turned on.

然后我想在这里添加一个矩形。
Then I would want here to add a rectangle.

应该会显示。
That should display.

税收,涉及第一个嗯、第一辆公共汽车、第一个例外、第一个信号的成本。
The tax, the cost that concerns the the first um, the first bus, the first the exception, the first signal.

因此,为了做到这一点,我将在文本字段中写入,我将读取百分比,如果我写入百分比,那么我可以引用一个字符串类型的文本变量。
So in order to do so, I will write in the text field, I will read percent s and if I write percent s, then I can refer to a text variable was type as a string.

这里我实际上会指出全局信号,即激活一个点的信号,呃,信号名称。
And here I will actually point to the global signals that active signals of one dot, uh, signal name.

好的。
OK.

然后我还想要一些东西来帮助我看看这是否是紧急警报或警告,或者,呃。
Then I would also want to have something that helps me see if this is either an emergency in alarm or a warning or, uh.

或者一条消息,所以为了做到这一点,我将在这里添加。
Or a message, so in order to do so, I will add over here.

比方说三个小马戏团。
Let's say three little circus.

这将根据异常的值的类型来着色,因此我将创建第一个颜色应。
That will color according to the value to the type of exception, so I will create the first one was color shall be.

读。
Read.

我很抱歉,我确实改变了框架颜色,我想改变感觉颜色将颜色改变为红色,我很难过在脆弱和隐形的状态下听到。
I was sorry, and I did change the frame color, I want to change the feel color will change the color to red, and I was sad to hear in the state vulnerable and invisible condition.

所以如果有的话我会希望这个圆圈是不可见的,除非这个信号不是警报。
So I will want this circle to be invisible if there is this, except this signal is not an alarm.

所以我会在这里写一个信号列表,而不是全局的,一个点的活动信号。
So I will write here, not global, a signal list, the active signals of one dot.

信号类型等于警报,或者也许我可以删除不简单的权利。
A signal type equal to alarm, or maybe I can remove the not simply right.

该信号不等于报警。
The signal is not equal to alarm.

如果这不等于警报,这将是不可见的。
If this is not equal to alarm, this will be invisible.

所以我会把它做成深红色。
So I will make it maybe dark red.

不,呃,更喜欢红色。
It is no, uh, like it more red.

好的,我将在这里创建第二个。
OK, so I will create a second one over here.

我将把它复制并粘贴到附近。
I will copy and paste it near here.

这将是一个警告,颜色应为黄色。
And this will be fodder for it being a warning and the color shall be yellow.

第三个将被放置。
And the third one will be placed.

这里。
Here.

会为了它。
Will be for it.

女巫的颜色是蓝色,因为它是一个信息。
Being a witch is the color blue, it will be for it being a message.

好的,现在让我们添加一个更好看的回顾。
OK, so right now let's also add a nicer looking back round.

所以我会简单地在所有东西的上面放置一个矩形。
So I will simply place a rectangle over here on top of everything.

我会将其移回屏幕背面,因此我单击“订单”并将其发回。
I will move it back to the the back of the screen, so I click click on Order and sent it back.

所以现在它将在后台。
So now it will be in the background.

我希望我们能够在这个可视化中使用一些渐变颜色。
I hope we are able to use some gradient colors in this visualization.

让我看起来更好,所以我会使用绿色。
Let me look nicer so I will use a green color.

这只是静态的,我想使用三种不同色调的。
This is only a static and I will want to use three different shades of.

所以也许它看起来更好一点。
So maybe it looks a little bit nicer.

我想要的是对前五个做同样的事情。
And what I want is do the same thing for, let's say, the first five.

例外,所以。
Exceptions, so.

我将移动我将复制此并将其放置在正下方。
I will move the I will copy this and place this exactly below at.

对不起,是的,在这里。
Sorry, yeah, here.

也许很多都好一点。
Maybe a lot of that a little bit better.

我将更改文本中的所有指标,在变量中引用引用两个。
And I will change all the indicators in the text, in the variables being references reference to two.

因此,这又是一项相当机械且重复的任务。
So this, again, is quite a mechanical and repetitive task.

顺便说一句,在完成每一英里时,通常会有点重复,所以我想我们只会在前五英里中这样做。
By the way, in doing each miles, it is typically a bit of repetitive, so I guess we will do that only for the first five.

所以今年的情况有点不合时宜。
So this year it is a little bit out of line.

好的。
OK.

其实你可以随心所欲地做,这只是为了教你如何在这里链接一些变量。
You can actually do it however you like, this is only for me to teach you how to link some variables here.

这就是我需要对第三个做同样的事情的地方。
That's where I need to do the same thing to the third.

那么三个。
So three.

三。
Three.

和。
And.

在这里,我认为这是第四个。
Here, I hold it to be the fourth one for.

那么还记得这个吗?
So remember this?

是的,好的,没关系。
Yeah, OK, that's fine.

为了。
For.

哦对不起。
Oh, sorry.

为了。
For.

并为。
And for.

这将是第五次。
And this will be the fifth.

再来一遍,第五。
All over again, fifth.

首先。
And first.

好的,然后我想将所有这些圆圈放在一起,放在红色圆圈的顶部。
OK, then I want to place all these circles on top of each other, on top of the red one.

所以我把它们放在这里只是为了能够仍然点击,点击它们并看看我点击了哪一个。
So I placed them over here just in order to be able to still click, click on them and seeing what a while which one I was clicking onto.

现在让我们通过单击所有黄色的并按住 Shift 按钮和键盘上的箭头来选择所有黄色的,让我们移动它。
So now let's select all the yellow ones by clicking on them and holding the shift button and with the arrows on your keyboard, let's move it.

将它们移到红色的顶部,然后对蓝色的进行同样的操作。
Move them on the top of the red one and let's do the same for the blue ones.

参议员们说他们处于相同的位置,他们只会打开一个,当例外处于活动状态时,他们是那个,那么让我们在这里添加一些文本。
Senators say they are on the same position and they will turn on only one, they are the one when an exception is active, then let's add some text over here.

我将在此处添加一个标签,这将是一个大标题。
I will add a label here and this will be, let's say, a large headline.

我会说这是一个错误的诊断页面。
And I will say that this is a faulty diagnosis page.

我需要把它做得更大。
And I need to make it bigger.

好的,我们还可以在此处添加一些例外情况的数字。
OK, and let's also add some numbers here for the exceptions.

我会把这个改小一点。
I'll make this a little bit smaller.

我们这里有一个。
Here we have a one.

醒悟到这一点。
Woke up to this.

下来找马修。
Down here for Matthew.

三、四、五。
Three, four, five.

我会将它们放置得尽可能近,您始终可以通过按住控件并使用鼠标进行缩放。
I will place them as close as possible, you can always zoom by holding control and using your mouse will.

它们并不完全一致,但现在它们会做到这一点。
They are not perfectly aligned, but for now they will do.

这意味着目前可以发挥作用,但它不是静态的。
This is meant to be functional for now, but it's not a static.

所以这里有五个。
So here is five.

那么我们现在就尝试上网吧。
So let's try to go online now.

带下载。
With download.

和。
And.

然后我们就会看到。
Then we will see.

一小时,一小时,然后我就开始我的工作了。
Hour, hour, then I'll the to my works.

哦对不起。
Oh, sorry.

我们需要。
We need to.

离线并将目标签证删除到可视化管理器中,因为否则,我猜。
Go offline and remove the target visa into the visualisations manager, because otherwise, I guess.

我们将无法显示我的诊断年龄。
We won't be able to display the diagnostic age my.

那么让我们,呃,查看并进行下载。
So let's, uh, look in and carry out to download.

我启动该程序并在那里打开它,我认为它是我的。
I start the program and opened it there, and I think it's my.

好的。
OK.

现在,我们可以看到所有行都是空的。
So right now, we can see that all the lines are empty.

还有。
And the.

这个红色的东西是红灯灭了,我们需要做的另一件事,实际上是改变主程序中的管理。
This red thing is red lamp is off on another thing that we need to do, actually, is change the management in the main program.

所以在主程序中。
So here in the main program.

我们实际上将不再使用该故障可行的所有故障,因此我们可以实际将其删除。
We will actually no longer use all of this fault that this fault viable so we can actually remove it and.

其实我们可以在这里说。
We can actually say here.

如果我们有全局列表、全局信号列表的紧急按钮,警报处于活动状态,这意味着存在故障,那么我们的状态将变为零。
That if we have the emergency button for the global list, the global signal list, that alarm active, that this means that there is a fault, then our state will get to zero.

因此,我们也会在我们站的电话会议中执行此操作。
So we will carry this out as well in our station's call.

所以我们不会有第四个变量。
So we won't have the fourth variable.

但对于全球主义者来说,警报很活跃。
But the globalists, that alarm active.

好的,我们现在就上网吧。
OK, so let's go online right now.

看看它是否有效。
And see if it works.

那么让我们从程序开始,回到我们的主要可视化。
So let's start with the program and get back into our main visualization.

让我们从莫辛开始吧。
Let's start with Moshin.

好吧,抱歉,我在运行的可视化的实际显示中遇到了一些问题。
OK, sorry, I had a little more issue in the actual display of the visualization that it is running.

现在尽可能流畅。
As fluid as possible now.

所以现在我们可以尝试进入我们的折叠可视化并打开诊断,每个都可以。
So now we can try to get into our fold visualization here and open the diagnostic, each might as well.

为了实际尝试模拟某种力,看看我们的信号管理系统是否能够检测到它们。
In order to actually try simulate some force and see if our signal management system will be able to detect them.

所以这对我来说是开放的诊断。
So that's open diagnostically to my.

并且要处于这样的状态。
And be in this condition.

那么让我们尝试一下。
So let's try.

在这里,抱歉,我还打开了,呃,真实可视化和用户坠落之间的开关。
Here, sorry, I also open the switch between the, uh, the real visualisations and the fall to the user.

那么让我们尝试伪造。
So let's try to fake the.

活塞启动位置传感器。
Pistons start position sensor.

至假。
To false.

这里。
Here.

我们现在可以看到我们的。
We can see right now our.

对刚刚收到的警报进行编程,我们实际上可以在这里自己显示我们的模拟,并向我展示有一个关于活塞装置的想法,一般故障,因为我们有一个单一的激活、单一的反馈装置,我们无法检测到它发生了什么故障。
Program the just got an alarm and we can actually display here on our own our simulation and show me that there is a thought concerning the piston device, generic fault, because we have a single activation, single feedback device on which we cannot we cannot detect which what fault is happening.

所以我会删除这个问题。
So I will remove the issue.

我将运行重置,我按下重置,故障就消失了。
I will run a reset, I press the reset, and the fault has disappeared here.

现在我可以重新开始,让我们尝试另一个完美的,假设电梯顶部传感器设置为真。
So now I can start again and let's try with another faultlessly, let's say the elevator top sensor set to true.

一个小装置,禁用反馈 Folt。
A little device, disabled feedback Folt.

所以它可以工作,它可以再次重置它,我们现在能够检测到有关设备的故障,所以。
So it works, it can reset it again, and we are able right now to detect faults concerning the devices, so.

现在,我们有一台功能齐全的机器,正在运行诊断属性,所以,嗯,之后你可以看到有一些故障,正如我告诉你的,我们无法在下一个视频中检测到。
Right now, we have a fully functioning machine with the diagnostic properties running, so, um, after that you can see that there are some faults, as I told you, that we are not able to detect in the next video.

我们将首先了解哪些传感器和执行器无法让我们的遗传设备自动检测故障。
We will start by looking at which of these sensors and actuators are not available for us to for our genetic devices to automatically detect faults.

我们将开始调查它。
And we will start looking into it.

请注意,我注意到有一个错误,这就是为什么它在这里显示禁用电梯反馈而不是听不见的反馈。
Just one note, I noticed there was a mistake, and that's why it showed here disable feedback for the elevator instead of inaudible feedback.

因为我犯了一个小错误,没有写在电梯反馈故障中。
It was because I did a little mistake and I didn't write it in feedback fault for the elevator.

所以,呃,在执行复制和粘贴所有内容的重复任务时,这是一个问题。
So, uh, this was an issue while doing this repetitive task of copying and pasting everything.

所以我建议你仔细检查一下,看看所有内容是否都写正确。
So I suggest you to double check it and see if everything is written correctly.

我将在下一个视频中见到您来实现它。
And I will see you in the next video to implement it.

他们是。
And they are of.